import request from '@/utils/request'

/**
 * 用户端分页查询项目信息
 * @param {*} query 
 * @returns 
 */
export const getProjectListSerivce = (query) => {
    return request.get('/user/project/page', {
        params: query
    })
}

/**
 * 用户端根据id查询项目数据
 * @param {*} id 
 * @returns 
 */
export const getProjectByIdService = (id) => {
    return request.get(`/user/project/${id}`)
}

/**
 * 用户端根据项目id查询对应评论数据
 * @param {*} id 
 * @returns 
 */
export const getProjectCommentListService = (id) => {
    return request.get(`/user/project/comment/${id}`)
}

/**
 * 用户评论项目数据
 * @param {*} query 
 * @returns 
 */
export const userAddProjectCommentService = (query) => {
    return request.post('/user/project/user/comment', query)
}

/**
 * 用户点赞项目信息
 * @param {*} id 
 * @returns 
 */
export const userAddProjectLikeService = (id) => {
    return request.post(`/user/project/user/like/${id}`)
}